<?php
session_start(); // session start

//retrive base64 encoded post variable and compare it with session id.
if (isset($_POST["unlock_key"]) && base64_decode($_POST["unlock_key"])===session_id())
{
    //user unlocked item by tweeting.
    echo "Congratulations! You just unlocked this text by Tweeting!";

}else{
    //Output HTTP errors
    header('HTTP/1.1 500 Oops! something went wrong...');
    exit();
}
?>
